/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.ban.news.server.check.checkers;

import cn.ac.iie.di.ban.news.server.check.CheckResult;
import cn.ac.iie.di.ban.news.server.check.Checker;
import java.text.SimpleDateFormat;
import java.util.List;

/**
 *
 * @author zwlin
 */
public class EnmusChecker implements Checker<String, List<String>> {

    private static final Exception exp = new Exception();

    /**
     *
     * @param src bigger
     * @param target smaller
     * @return
     */
    @Override
    public CheckResult check(String src, List<String> target) {
        try {
            if (null == src || (src = src.trim()).isEmpty()) {
                return new CheckResult();
            }
            if (!target.contains(src)) {
                throw exp;
            }
        } catch (Exception ex) {
            return new CheckResult("enmus location error." + target + " " + src);
        }
        return new CheckResult();
    }

}
